<template>
    <van-row>
        <a-carousel class="swipe-info" autoplay arrows :autoplaySpeed="8000" :speed="1000" :dots="false">
            <div slot="prevArrow" slot-scope="props"
                class="custom-slick-arrow" style="left: 10px;zIndex: 1" >
                <img class="taggeicon" src="../assets/img/arrow-left.png" alt="">
            </div>
            <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
                <img class="taggeicon" src="../assets/img/arrow-right.png" alt="">
            </div>
            <div v-for="(item,index) in bannerArr" :key="index" :style="{background:`url(${item.image})`}" class="bannerimg" @click="Jumpto(item.path)">
                <span class="swipe-title-1">{{item.subhead}}</span>
                <span class="swipe-title-2">{{item.banner_title}}</span>
            </div>
        </a-carousel>
    </van-row>
</template>

<script>
export default {
    props:['bannerArr'],
    data(){
        return{

        }
    },
    mounted(){
    },
    methods:{
      Jumpto(key){
        this.$router.push(key)
      },
        pagechange(){
            console.log("isChange")
        }
    }
}
</script>

<style scoped>
.ant-carousel >>> .slick-slide {
  text-align: center;
  height: 144px;
  /* background: #364d79; */
  overflow: hidden;
  border-radius: 5px;
}
.bannerimg{
    height: 144px;
    width: 360px;
    background-position: center center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
}
.ant-carousel >>> .custom-slick-arrow {
  width: 26px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  margin-top: -20px;
}
.taggeicon{
    width: 10px;
    margin:10px 0 0 8.3px;
}
.ant-carousel >>> .custom-slick-arrow:before {
  display: none;
}
.ant-carousel >>> .custom-slick-arrow:hover {
  opacity: 0.5;
}

.ant-carousel >>> .slick-slide h3 {
  color: #fff;
}

.swipe-info{
    width: 360px;
    margin: 0 auto;
    border-radius: 5px;
}

.swipe-title-1{
    height: 12px;
    display: block;
    text-align: center;
    margin-top: 43px;
    font-size: 16px;
    color: #fff;
    font-family: "PingFang SC","Microsoft YaHei";
}
.swipe-title-2{
    display: block;
    width: 120px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    margin: 0 auto;
    margin-top: 23px;
    font-size: 13px;
    color: #fefefe;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    font-family: "PingFang SC","Microsoft YaHei";
}


.slick-active> div >.bannerimg>.swipe-title-1{
  -webkit-animation: slideDown 800ms ease-in-out;
  -moz-animation: slideDown 800ms ease-in-out;
  animation: slideDown 800ms ease-in-out;
}
.slick-active> div > .bannerimg>.swipe-title-2{
  -webkit-animation: slideDown 2000ms ease-in-out;
  -moz-animation: slideDown 2000ms ease-in-out;
  animation: slideDown 2000ms ease-in-out;
}










@-webkit-keyframes slideDown {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -webkit-transform: translateY(30px);
  }

  80% {
    -webkit-transform: translateY(-10px);
  }

  100% {
    -webkit-transform: translateY(0);
  }
}
@-moz-keyframes slideDown {
  0% {
    opacity: 0;
    -moz-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -moz-transform: translateY(30px);
  }

  80% {
    -moz-transform: translateY(-10px);
  }

  100% {
    -moz-transform: translateY(0);
  }
}
@-o-keyframes slideDown {
  0% {
    opacity: 0;
    -o-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -o-transform: translateY(30px);
  }

  80% {
    -o-transform: translateY(-10px);
  }

  100% {
    -o-transform: translateY(0);
  }
}
@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    transform: translateY(30px);
  }

  80% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0);
  }
}
.slideDown {
  -webkit-animation-name: slideDown;
  -moz-animation-name: slideDown;
  -o-animation-name: slideDown;
  animation-name: slideDown;
}





</style>